Program IFSTest;
//Enable Script > Allow API Calls for this to work
function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall' ;
function ShowWindow(hWnd, nCmdShow: Longint): Integer; external 'ShowWindow@user32.dll stdcall';
function SetWindowText(hWnd: Longint; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
var
  wnd: Longint;
Begin
  wnd := Findwindow('', 'dlltest.txt - SCAR 1.08 by Kaitnieks');
  SetWindowText(Wnd, 'This is DLL demo, it calls some windows user32 routines. This will hide this window for a few seconds');
  Wait(2000);
  ShowWindow(Wnd, 0); // hide it
  Wait(2000);
  SetWindowText(Wnd, 'Wasn''t that nice?');
  ShowWindow(Wnd, 5); // show it
  Wait(2000);
  SetWindowText(Wnd, 'SCAR roxors');
End.

